<!--属性列表--> 
<template>

	<div id="productAttributeSearchList" class="container-fluid">

		
	<div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title">查询条件</h3>
      </div>
      <div class="panel-body">
				 <el-form :inline="true" :model="formInline" class="demo-form-inline">
				  <el-form-item label="名称">
				    <el-input  placeholder="名称"></el-input>
				  </el-form-item>
				  </el-form-item><el-form-item>
				    <el-button type="primary" @click="onSubmit">查询</el-button>
				  </el-form-item>
				</el-form>
      </div>
    </div>


    <div class="panel panel-success">
      <div class="panel-heading">
        <h3 class="panel-title">查询结果</h3>
      </div>
      <div class="panel-body">
     		<table class="table table-striped table table-bordered table-condensed">
			 	<thead>
			 		<tr>
			 			<th>编码</th>
			 			<th>名称</th>
			 			<th>是否有效</th>
			 			<th>录入时间</th>
			 			<th>操作</th>
			 		</tr>
			 	</thead>

			 	<tbody>
			 	 
            <tr v-for=" attr in dataList ">

                <td>
                    {{attr.id}}
                </td>
                
                <td>
                    {{attr.name}}
                </td>

          
                <td>
                   {{attr.status}}

                <td>
                  {{attr.inputOn}}
                </td>

             
                <td>  
                   <el-button type="primary" icon="edit">编辑</el-button>
                </td>

            </tr>
			 	</tbody>
			</table>


       <div class="block">
       
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="this.form.pageNum"
          :page-sizes="[10, 20, 30, 40]"
          :page-size="form.pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="page.totalSize">
        </el-pagination>
      </div>


      </div>
    </div>



	</div>

		
</template>

<script>
  import axios from 'axios'
  export default{
  	data () {
  		return {
  		 form:{
            phone:'',
            pageNum: 1,
            pageSize: 10,
            startTime:'',
            endTime:'',
          },
         dataList: [],
         page:{
            totalSize: 0,
            totalPage: ''
          },
  		}
  	},
    mounted(){
      this.searchList();
    },
  	methods: {
  		searchList (){
  			axios.post("/api/productAttribute/getProductAttributeListByPage",this.form).then((res) => {
          		this.dataList=res.data.data.productAttributeList;
          		this.page.totalSize=res.data.data.total;
  			});
  		},
  	 //查询按钮
      onSubmit (){
        this.searchList();
      },
      //分页
      handleCurrentChange(pageNum){
        this.form.pageNum=pageNum;
        this.searchList();
      },
      //页码
      handleSizeChange(pageSize){
        this.form.pageSize=pageSize;
        this.searchList();
      }
  	}
  }
	
</script>

<style lang="less" scoped>

<style>


